<?xml version = '1.0' encoding = 'UTF-8'?>
<HBRRepo><variables><variable name="Version" type="member" usage="const" id="1" product="Planning"><property name="application">Vision</property><property name="dimensionInputMode">type</property><property name="dimensionType">Version</property><property name="prompt_text">ID_PRMTEXT_VERSION</property><value>"Working"</value><limits type="list"><property name="value">"Working","What If","Most Likely","Best Case","Worst Case"</property></limits></variable></variables><rulesets><ruleset id="1" name="Calculate Plan Operating Expenses" product="Planning"><property name="application">Vision</property><property name="mergeVars">true</property><variable_references><variable_reference name="Version" id="1"><property name="application">Vision</property><property name="hasvalue">true</property><property name="hidden">false</property><property name="rule_name">Operating Expenses Plan</property><property name="seq">1</property><property name="seq_index">1</property><property name="type">3</property><property name="useAsOverrideValue">false</property></variable_reference></variable_references><step type="rule" id="1" name="OPERATING EXPENSES PLAN" seq="1"><property name="application">Vision</property><property name="launch_application">Vision</property><property name="launch_plantype">Plan1</property><property name="plantype">Plan1</property><property name="product">Planning</property></step><step type="rule" id="2" name="OPERATING EXPENSE ADJ PLAN" seq="2"><property name="application">Vision</property><property name="launch_application">Vision</property><property name="launch_plantype">Plan1</property><property name="plantype">Plan1</property><property name="product">Planning</property></step></ruleset></rulesets><rules><rule id="2" name="Operating Expense Adj Plan" product="Planning"><property name="application">Vision</property><property name="plantype">Plan1</property><property name="display_label">Operating Expense Adj Plan</property><variable_references><variable_reference name="Version" id="1"><property name="application">Vision</property><property name="hasvalue">true</property><property name="hidden">false</property><property name="rule_name">Operating Expense Adj Plan</property><property name="seq">1</property><property name="type">3</property><property name="useAsOverrideValue">false</property></variable_reference></variable_references><script type="calcscript">SET AGGMISSG ON;
FIX ("Adj Plan",&amp;NextYear,"P_000",@RELATIVE("7001",0),@CHILDREN("403"))
      {Version} (
      IF ("Driver Rate"->"BegBalance" != #missing)
         {Version} = "Driver Volume"->"Plan" * "Driver Rate"->"BegBalance";
      ENDIF
      )
ENDFIX

FIX (@IDESCENDANTS("OpEx"),{Version});
   "Adj Plan";
   "Revised Plan" = "Plan" + "Adj Plan";
ENDFIX
FIX ("Adj Plan","Revised Plan",{Version})
   @IDESCENDANTS("OpEx");
   @ICHILDREN("403");
ENDFIX


</script></rule><rule id="1" name="Operating Expenses Plan" product="Planning"><property name="application">Vision</property><property name="plantype">Plan1</property><property name="display_label">Operating Expenses Plan</property><variable_references><variable_reference name="Version" id="1"><property name="application">Vision</property><property name="hasvalue">true</property><property name="hidden">false</property><property name="rule_name">Operating Expenses Plan</property><property name="seq">1</property><property name="type">3</property><property name="useAsOverrideValue">false</property></variable_reference></variable_references><script type="calcscript">SET UPDATECALC OFF;
SET AGGMISSG ON;

FIX ("Plan",{Version},&amp;NextYear,@ICHILDREN("403"))
   @IDESCENDANTS("OpEx");
ENDFIX

FIX ("Plan",{Version},&amp;NextYear)
   FIX(@IDESCENDANTS("OpEx"),"Trips","Square Feet","9000","Average Salaries")
      CALC DIM ("Entity");
   ENDFIX
   ("Average Salaries" = @ROUND("5800" / "9000",2);
   "Employee Benefits %" = @ROUND("6100" / "5800",2);)
ENDFIX

/* Driver: 1 = % of Revenue, 2 = Units, 3 = Headcount Hours, 4 = Sales Calls, 5 = Trips, 6 = Square Feet, 7 = Input or Blank */
/*Method: 1 = Last Year Actual, 2 = Current Year Plan, 3 = Current Year Forecast */
FIX ("Plan",&amp;NextYear,"P_000")
	FIX (@RELATIVE("7001",0),@CHILDREN("403"))
  "Driver Volume" (
    IF (@ISMBR(@Relative("YearTotal",0)))
        IF ("Driver"->"BegBalance" ==1)
          "Driver Volume" = "4001"->"P_TP1"->{Version};
        ELSEIF ("Driver"->"BegBalance" ==2)
          "Driver Volume" = "Units"->"P_TP1"->{Version};
        ELSEIF ("Driver"->"BegBalance" ==3)
          "Driver Volume" = "9000"->{Version} * 2080/12;
        ELSEIF ("Driver"->"BegBalance" ==4)
          "Driver Volume" = "Sales Calls"->"BegBalance"->{Version}/12;
        ELSEIF ("Driver"->"BegBalance" ==5)
          "Driver Volume" = "Trips"->{Version};
        ELSEIF ("Driver"->"BegBalance" ==6)
          "Driver Volume" = "Square Feet"->{Version}/12;
        ELSEIF (("Driver"->"BegBalance" ==7 OR "Driver" == #missing) AND "Method"->"BegBalance" == 1)
          "Driver Volume" = "Actual"->&amp;ActVersion->&amp;LastYr;
        ELSEIF (("Driver"->"BegBalance" ==7 OR "Driver" == #missing) AND "Method"->"BegBalance" == 2)
          "Driver Volume" = "Plan"->&amp;PlanVersion->&amp;CurYr;
        ELSEIF (("Driver"->"BegBalance" ==7 OR "Driver" == #missing) AND "Method"->"BegBalance" == 3)
          "Driver Volume" = "Forecast"->&amp;ForVersion->&amp;CurYr;
        ENDIF
      ENDIF
	  )
	ENDFIX
ENDFIX

FIX ("Actual",&amp;LastYr,"P_000")
	FIX (@RELATIVE("7001",0),@CHILDREN("403"))
  "Driver Volume" (
    IF (@ISMBR(@Relative("YearTotal",0)))
        IF ("Driver"->"Plan"->&amp;NextYear->"BegBalance" ==1)
          "Driver Volume" = "4001"->"P_TP1"->&amp;ActVersion;
        ELSEIF ("Driver"->"Plan"->&amp;NextYear->"BegBalance" ==2)
          "Driver Volume" = "Units"->"P_TP1"->&amp;ActVersion;;
        ELSEIF ("Driver"->"Plan"->&amp;NextYear->"BegBalance" ==3)
          "Driver Volume" = "9000"->&amp;ActVersion * 2080/12;
        ELSEIF ("Driver"->"Plan"->&amp;NextYear->"BegBalance" ==4)
          "Driver Volume" = "Sales Calls"->"BegBalance"->&amp;ActVersion/12;
        ELSEIF ("Driver"->"Plan"->&amp;NextYear->"BegBalance" ==5)
          "Driver Volume" = "Trips"->&amp;ActVersion;
        ELSEIF ("Driver"->"Plan"->&amp;NextYear->"BegBalance" ==6)
          "Driver Volume" = "Square Feet"->&amp;ActVersion/12;
        ENDIF
      ENDIF
	  )
  "Driver Rate" (
    IF (@ISMBR("BegBalance"))
        IF ("Driver Volume"->"YearTotal" != #missing)
           "Driver Rate" = &amp;ActVersion->"YearTotal" / "Driver Volume"->"YearTotal";
        ENDIF
      ENDIF
	  )
	ENDFIX
ENDFIX

FIX ("Plan",&amp;CurYr,"P_000")
	FIX (@RELATIVE("7001",0),@CHILDREN("403"))
  "Driver Volume" (
    IF (@ISMBR(@Relative("YearTotal",0)))
        IF ("Driver"->"Plan"->&amp;NextYear->"BegBalance" ==1)
          "Driver Volume" = "4001"->"P_TP1"->&amp;PlanVersion;
        ELSEIF ("Driver"->"Plan"->&amp;NextYear->"BegBalance" ==2)
          "Driver Volume" = "Units"->"P_TP1"->&amp;PlanVersion;;
        ELSEIF ("Driver"->"Plan"->&amp;NextYear->"BegBalance" ==3)
          "Driver Volume" = "9000"->&amp;PlanVersion * 2080/12;
        ELSEIF ("Driver"->"Plan"->&amp;NextYear->"BegBalance" ==4)
          "Driver Volume" = "Sales Calls"->"BegBalance"->&amp;PlanVersion/12;
        ELSEIF ("Driver"->"Plan"->&amp;NextYear->"BegBalance" ==5)
          "Driver Volume" = "Trips"->&amp;PlanVersion;
        ELSEIF ("Driver"->"Plan"->&amp;NextYear->"BegBalance" ==6)
          "Driver Volume" = "Square Feet"->&amp;PlanVersion/12;
        ENDIF
      ENDIF
	  )
  "Driver Rate" (
    IF (@ISMBR("BegBalance"))
        IF ("Driver Volume"->"YearTotal" != #missing)
           "Driver Rate" = &amp;PlanVersion->"YearTotal" / "Driver Volume"->"YearTotal";
        ENDIF
      ENDIF
	  )
	ENDFIX
ENDFIX

FIX ("Forecast",&amp;CurYr,"P_000")
	FIX (@RELATIVE("7001",0),@CHILDREN("403"))
  "Driver Volume" (
    IF (@ISMBR(@Relative("YearTotal",0)))
        IF ("Driver"->"Plan"->&amp;NextYear->"BegBalance" ==1)
          "Driver Volume" = "4001"->"P_TP1"->&amp;ForVersion;
        ELSEIF ("Driver"->"Plan"->&amp;NextYear->"BegBalance" ==2)
          "Driver Volume" = "Units"->"P_TP1"->&amp;ForVersion;;
        ELSEIF ("Driver"->"Plan"->&amp;NextYear->"BegBalance" ==3)
          "Driver Volume" = "9000"->&amp;ForVersion * 2080/12;
        ELSEIF ("Driver"->"Plan"->&amp;NextYear->"BegBalance" ==4)
          "Driver Volume" = "Sales Calls"->"BegBalance"->&amp;ForVersion/12;
        ELSEIF ("Driver"->"Plan"->&amp;NextYear->"BegBalance" ==5)
          "Driver Volume" = "Trips"->&amp;ForVersion;
        ELSEIF ("Driver"->"Plan"->&amp;NextYear->"BegBalance" ==6)
          "Driver Volume" = "Square Feet"->&amp;ForVersion/12;
        ENDIF
      ENDIF
	  )
  "Driver Rate" (
    IF (@ISMBR("BegBalance"))
        IF ("Driver Volume"->"YearTotal" != #missing)
           "Driver Rate" = &amp;ForVersion->"YearTotal" / "Driver Volume"->"YearTotal";
        ENDIF
      ENDIF
	  )
	ENDFIX
ENDFIX

FIX ("Plan",&amp;NextYear,"P_000")
	FIX (@RELATIVE("7001",0),@CHILDREN("403"))
  "Driver Rate" (
    IF (@ISMBR("BegBalance"))
        IF ("Driver" == 1)
          "Driver Rate" = "Rate Pct";
        ELSEIF (("Driver" == 7 OR "Driver" == #missing) AND "Method" != #missing)
          "Driver Rate" = 1 +"Rate Pct";
        ELSEIF ("Method" == 1)
           "Driver Rate" = @MDSHIFT("Driver Rate"->"Actual",-2,"Year",) * (1 + "Rate Pct"->"BegBalance");
        ELSEIF ("Method" == 2)
           "Driver Rate" = @MDSHIFT("Driver Rate"->"Plan",-1,"Year",) * (1 + "Rate Pct"->"BegBalance");
        ELSEIF ("Method" == 3)
           "Driver Rate" = @MDSHIFT("Driver Rate"->"Forecast",-1,"Year",) * (1 + "Rate Pct"->"BegBalance");
        ENDIF
      ENDIF
	  )
  {Version} = "Driver Volume" * "Driver Rate"->"BegBalance";
	ENDFIX
ENDFIX

FIX ("Plan","Adj Plan","Revised Plan",{Version},&amp;NextYear,@ICHILDREN("403"))
   @IDESCENDANTS("OpEx");
ENDFIX

FIX ({Version},&amp;NextYear);
   "Revised Plan" = "Plan" + "Adj Plan";
ENDFIX</script></rule></rules><components/><deployobjects><deployobject product="2" application="vision" plantype="plan1" obj_id="1" obj_type="1" name="OPERATING EXPENSES PLAN"/><deployobject product="2" application="vision" plantype="plan1" obj_id="2" obj_type="1" name="OPERATING EXPENSE ADJ PLAN"/><deployobject product="2" application="vision" obj_id="1" obj_type="2" name="CALCULATE PLAN OPERATING EXPENSES"/></deployobjects></HBRRepo>